﻿//=====================================================================================================
// LocalizationLibrary
// The Localization Library is a collection of reusable software component that provide 
// support for localization. This library enable you to localize WPF, Silverlight and WP7 applications.
// (http://localizationlibrary.codeplex.com)
//=====================================================================================================
// Author: Nicola Gallo (Website: www.nicola.gallo.name, Email: nicolagmt@hotmail.it) 
//=====================================================================================================

namespace LocalizationLibrary.Reflection
{
    //.NET References
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Windows;
    using System.Windows.Resources;

    /// <summary>
    /// Represents the status of an asynchronous <see cref="XapDeploymentPart"/> loading operation.
    /// </summary>
    public class XapDeploymetPartAsyncResult : DeploymetPartAsyncResult 
    {
        //Fields

        private AssemblyPartCollection _assemblyParts; 

        //Constructors

        /// <summary>
        /// Creates a new instance of <see cref="XapDeploymetPartAsyncResult"/>.
        /// </summary>
        /// <param name="asyncState"></param>
        public XapDeploymetPartAsyncResult(object asyncState) : base(asyncState) { }

        //Properties

        /// <summary>
        /// Gets all the <see cref="AssemblyPart"/>s loaded.
        /// </summary>
        public AssemblyPartCollection AssemblyParts 
        {
            get
            {
                if (this._assemblyParts == null)
                {
                    this._assemblyParts = new AssemblyPartCollection();
                }
                return this._assemblyParts;
            }
        }

        /// <summary>
        /// Gets the stream resource info.
        /// </summary>
        public StreamResourceInfo StreamResourceInfo { get; set; }
    }
}
